Skip to main content

Extracts data from a specified URL.

POST 

/smart_scraper

Returns the required data from a specified URL using a given prompt and/or schema.

Authentication:

To authenticate with the SmartScraper API, you need to include the SG-APIKEY header in your requests. This header should contain your API key.

Request

Body

required

    url stringrequired

    The URL of the web page to scrape.

    prompt stringrequired

    The prompt describing what data to extract.

    schema string

    The schema for structuring the extracted data

Responses

The response will be a JSON object containing the extracted data and metadata about the request.

Schema

    success booleanrequired

    Indicates whether the scraping was successful.

    credits_left stringrequired

    Remaining credits for the user.

    url stringrequired

    The URL that was scraped.

    result objectrequired

    The data extracted from the web page.

Loading...